package cn.eureka;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * 需关闭csrf才能对eureka配置密码，否则只能登录不能注册服务
 *
 * @Author: MaoSuyu
 * @User：John
 * @Date: 2019/6/4
 * @Time: 15:01
 * @Description: No Description
 */
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        super.configure(http);
        http.csrf().disable();
    }

}
